package icu.qx.pbs.feign;

import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.common.security.annotation.RequiresPermissions;
import icu.qx.pbs.domain.GbsGood;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Component
@FeignClient(value = "yyj-mes-gbs")
public interface GbsGoodFeign {
    /**
     * 修改物品 通过 is_material 区分物料和产品
     */
    @RequiresPermissions("gbs:good:edit")
    @PutMapping("/gbs/good/route")
    AjaxResult editRoute(@RequestBody List<GbsGood> gbsGoods);

    /**
     * 获取物品 通过 is_material 区分物料和产品详细信息
     */
    @RequiresPermissions("gbs:good:query")
    @GetMapping(value = "/gbs/good/route/{pdCode}")
    AjaxResult getInfoByRoute(@PathVariable("pdCode") String routeCode);
}
